﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SimpleRest.Core.Extensions.Documentation
{
    [AttributeUsage(AttributeTargets.Method | AttributeTargets.Class, AllowMultiple=true)]
    public class LinkDescriptionAttribute : Attribute
    {
        public LinkDescriptionAttribute(string uri)
        {
            this.Uri = uri;
        }
        public LinkDescriptionAttribute(string uri, string description)
            : this(uri)
        {
            this.Description = description;
        }

        public string Uri { get; set; }
        public string Description { get; set; }

        public Link GetLink()
        {
            return new Link()
            {
                Uri = this.Uri,
                Description = this.Description
            };
        }
    }
}
